package com.chen.facemanager.dao;

import com.chen.facemanager.bean.Sca;
import com.chen.facemanager.bean.WxOrder;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface WxOrderDao extends CrudRepository<WxOrder,Long> {


    @Query(value = "update WxOrder a set a.status = '200' where a.out_trade_no = ?1")
    @Modifying
    void updateByOrderid(String out_trade_no);


    @Query("from WxOrder a where a.wx_order_no = ?1")
    WxOrder findOrder(String wx_no);
}
